/*
 * Copyright 2012 Fabian Wenzelmann
 * 
 * This file is part of Recognition-Procedures-for-Boolean-Functions.
 * 
 * Recognition-Procedures-for-Boolean-Functions is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Recognition-Procedures-for-Boolean-Functions is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with Recognition-Procedures-for-Boolean-Functions.  If not, see <http://www.gnu.org/licenses/>.
 */

package de.wenzelmf.booleanFunction.booleanExpression;

import java.util.ArrayList;

/**
 * Contains just a main method and runs some tests.
 * 
 * @author Fabian Wenzelmann
 *
 */
public class BooleanExpressionTest
{
	
	public static void main(String[] args)
	{
		
		BooleanExpression phi = new Conjunction( new Disjunction(new Atom("x1"), new Atom("x2")), new Negation(new Atom("x3")));
		System.out.println(phi.variableSet());
		
		ArrayList<String> variableOrder = new ArrayList<String>(3);
		variableOrder.add("x1");
		variableOrder.add("x2");
		variableOrder.add("x3");
		ExpressionToFunction f = new ExpressionToFunction(phi, variableOrder);
		
		boolean[] input1 = {true, false, false};
		boolean[] input2 = {false, false, false};
		boolean[] input3 = {true, true, true};
		System.out.println(f.getValue(input1));
		System.out.println(f.getValue(input2));
		System.out.println(f.getValue(input3));
	}
	
}
